#!/bin/bash

# 1.webpackage编译本项目
# 2.把编译好的结果文件丢进java项目中

# npm run build



# cm4=$(cp index.html  ~/src/www_8090/index.html;cp main.html  ~/src/www_8090/main.html;)
# echo "$cm4"
# cm1=$(npm run build)
# r1=$(echo $cm1)
# echo $r1

#本地发布
# cm2=$(mkdir ~/src/www_8090/web_serial/;cp -rf dist  ~/src/www_8090/web_serial/)
# cm3=""


# result=$(echo $r1 | grep "npm ERR")
# if [[ "$result" != "" ]];then
#     echo "错误！npm错误！"
#     exit
# fi

# result=$(echo $r1 | grep "hidden modules")
# if [[ "$result" != "" ]];then
#     echo "npm run build "
#     # echo "$cm2 done"
#     # echo "$cm4"
#     sleep 1
#     # r3=$(echo $cm3)
#     # echo $r3
# else
#     echo 'fail'
# fi

#java项目
# cm6=$(cp -rf dist ../webapp/web/)
# echo "$cm6"

# cm=$(cp -rf index.html ../webapp/web/;cp -rf main.html ../webapp/web/;)
# echo "$cm"

# echo 'move success'


